<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
    <title>webSocket首页</title>
</head>
<script src="${basePath}/js/jquery.min.js"></script>  
<script src="${basePath}/js/webSocket.js"></script>  
<body>

webSocket首页

</body>
<script type="text/javascript">
initWebSocket();


var webSocket = null;
function initWebSocket() {
	webSocket = $.initWebSocket({
		"onMessage": message
	});
}

function send(msg) {
	webSocket.send(msg);
}

function message(ev) {
	alert(ev.data);
}


</script>

</html>